local comm = cmd(x,SCREEN_CENTER_X;y,SCREEN_BOTTOM-97)
local coinmode = GAMESTATE:GetCoinMode()

local t = Def.ActorFrame{}

if coinmode == 'CoinMode_Home' then
	t[#t+1] = LoadFont("piusysfont")..{
		Name="HourDate";
		--Condition=(coinmode == 'CoinMode_Home');
		InitCommand=cmd(x,20;y,SCREEN_BOTTOM-20;horizalign,left;shadowlength,0);
	};
	
	t[#t+1] = LoadActor("FORPC")..{
		InitCommand=cmd(x,SCREEN_LEFT+51;y,SCREEN_TOP+27);
		--Condition=(GAMESTATE:GetCoinMode() == 'CoinMode_Home');
	};
	
	t[#t+1] = LoadActor("frame")..{
		InitCommand=comm;
	}
	
	t[#t+1] = LoadActor("arrows")..{
		InitCommand=comm;
	}
	
	t[#t+1] = LoadActor("text")..{
		InitCommand=function(self)
			(comm)(self);
			(cmd(diffuseshift;effectcolor1,0,0.2,1,1;effectcolor2,0,0,0,1))(self);
		end;
	}
end

local function SetTimeAndDate(self)
	local Clock = self:GetChild("HourDate");
	local hour = Hour() % 12
	if hour == 0 then
		hour = 12
	end
	local Prnd = "am"
	if Hour() >= 12 then
		Prnd = "pm"
	end
	
	local Time = string.format("%02i:%02i:%02i %s",hour,Minute(),Second(),Prnd)
	local Date = string.format("%d/%s/%d",DayOfMonth(),MonthToLocalizedString(Month[MonthOfYear()+1]),Year())
	
	Clock:settext(Time.."\n"..Date)
end

t[#t+1] = LoadActor("../stuff/_advisor")

t.InitCommand=cmd(SetUpdateFunction,SetTimeAndDate)

return t